package 建造者模式.造小人;

import javax.swing.*;
import java.awt.Graphics;

/**
 * @author zyl
 * @Description
 * @since 2024/1/4 14:58
 */

public class Client extends JFrame{

    public Client(){
        setSize(400,800);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
    }
    public void paint(Graphics g){
        PersonThinBuilder personThinBuilder = new PersonThinBuilder(g);
        PersonDirector personThinDirector = new PersonDirector(personThinBuilder);
        personThinDirector.CreatePerson();

        PersonFatBuilder personFatBuilder = new PersonFatBuilder(g);
        PersonDirector personFatDirector = new PersonDirector(personFatBuilder);
        personFatDirector.CreatePerson();
    }
    public static void main(String[] args) {
        new Client().setVisible(true);
    }
}
